<template>
    <div>
        <di class="box">
            <div class="nav">
                <div class="navLift">
                    <span>好用的考试云平台</span>
                </div>
                <div class="navConten">
                    <a href="#">考试中心</a>
                    <a href="#">模拟练习</a>
                    <a href="#">查询成绩</a>
                </div>
                <div class="navRight">
                    <el-icon>
                        <UserFilled />
                    </el-icon>
                    <span>{{ user.userName }}</span>
                </div>
            </div>
            <div class="head">
                <el-carousel :interval="4000" type="card" height="250px">
                    <el-carousel-item v-for="item in 3" :key="item">
                        <h3 text="2xl" justify="center">{{ item }}</h3>
                    </el-carousel-item>
                </el-carousel>
            </div>
            <div class="footer">
                <div class="alignment-container">
                    <el-space>
                        模拟科目一
                        <el-card>
                            <template #header> 考试时间:60分钟</template>
                            <el-button @click="again" type="primary"> 开始做题 </el-button>
                        </el-card>
                    </el-space>
                </div>
                <div class="alignment-container">
                    <el-space>
                        <el-card>
                            <template #header> 考试时间:60分钟</template>
                            <el-button @click="again" type="primary"> 开始做题 </el-button>
                        </el-card>
                        模拟科目四
                    </el-space>
                </div>
            </div>
        </di>
    </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
    name: "",
    data() {
        return {
        }
    },
    created() {

    },
    mounted() {

    },
    computed:{
        ...mapState({
            user: state => state.user
        }),
    },
    methods: {
        again() {
            this.$router.replace({ path: '/toeflIbt' })
        },
    },
}
</script>
<style scoped lang="scss">
.box {
    .nav {
        width: 1200px;
        height: 60px;
        line-height: 60px;
        font-size: 16px;
        color: #000000;
        margin: 0 auto;
        border-bottom: 1px solid #ccc;

        .navLift {
            float: left;
        }

        .navConten {
            float: left;

            a {
                line-height: 80px;
                font-weight: bold;
                margin-right: 40px;
                color: #1890ff;
            }

            :nth-of-type(1) {
                margin-left: 335px;
                padding-bottom: 10px;
                border-bottom: 2px solid #1890ff;
            }
        }

        .navRight {
            float: right;
        }
    }

    .head {
        margin-top: 20px;
        height: 280px;

        .el-carousel {
            width: 80%;
            margin: 0 auto;

            .el-carousel__item {
                h3 {
                    color: #475669;
                    opacity: 1;
                    line-height: 200px;
                    margin: 0;
                    text-align: center;
                }

                :nth-child(2n) {
                    background-image: url(../../assets/66.webp);
                    background-color: #d3dce6;
                    width: 100%;
                    height: 100%;
                    background-size: 100% 100%;
                }

                :nth-child(2n + 1) {
                    // background-image: url(../../assets/12.png);
                    background-color: #99a9bf;
                    width: 100%;
                    height: 100%;
                    background-size: 100% 100%;
                }
            }
        }


    }

    .footer {
        margin:  0 auto;
        margin-top: 50px;
        width: 60%;
        display: flex;
        .alignment-container {
            margin: 10px 100px;
            width: 260px;
            margin-bottom: 20px;
            text-align: center;
            padding: 8px;
        }
    }
}
</style>